home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Reduce.z / MPI_Reduce
Encoding:
Text File  |  2002-10-03  |  3.6 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____RRRREEEEDDDDUUUUCCCCEEEE((((3333))))                                                    MMMMPPPPIIII____RRRREEEEDDDDUUUUCCCCEEEE((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____RRRReeeedddduuuucccceeee - Reduces values on all processes to a single value
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      C:
  13.  
  14.           #include <mpi.h>
  15.  
  16.           int MPI_Reduce ( _s_e_n_d_b_u_f, _r_e_c_v_b_u_f, _c_o_u_n_t, _d_a_t_a_t_y_p_e,
  17.           _o_p, _r_o_o_t, _c_o_m_m )
  18.           void             *_s_e_n_d_b_u_f;
  19.           void             *_r_e_c_v_b_u_f;
  20.           int               _c_o_u_n_t;
  21.           MPI_Datatype      _d_a_t_a_t_y_p_e;
  22.           MPI_Op            _o_p;
  23.           int               _r_o_o_t;
  24.           MPI_Comm          _c_o_m_m;
  25.  
  26.  
  27.      C++:
  28.  
  29.           #include <mpi.h>
  30.  
  31.           void Intracomm::Reduce(
  32.           const void*       _s_e_n_d_b_u_f,
  33.           void*             _r_e_c_v_b_u_f,
  34.           int               _c_o_u_n_t,
  35.           const Datatype&   _d_a_t_a_t_y_p_e,
  36.           const Op&         _o_p,
  37.           int               _r_o_o_t) const
  38.  
  39.  
  40.      Fortran:
  41.  
  42.           INCLUDE "mpif.h" (or USE MPI)
  43.  
  44.           <type> SENDBUF(*), RECVBUF(*)
  45.           INTEGER _c_o_u_n_t, _d_a_t_a_t_y_p_e, _o_p, _r_o_o_t, _c_o_m_m, _i_e_r_r_o_r
  46.  
  47.           CALL MPI_REDUCE(_s_e_n_d_b_u_f, _r_e_c_v_b_u_f, _c_o_u_n_t, _d_a_t_a_t_y_p_e, _o_p, _r_o_o_t, _c_o_m_m, _i_e_r_r_o_r)
  48.  
  49.  
  50. SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
  51.      This release implements the MPI 1.2 standard, as documented by the MPI
  52.      Forum in the spring 1997 release of _M_P_I:  _A _M_e_s_s_a_g_e _P_a_s_s_i_n_g _I_n_t_e_r_f_a_c_e
  53.      _S_t_a_n_d_a_r_d.
  54.  
  55. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.      The MMMMPPPPIIII____RRRReeeedddduuuucccceeee routine reduces values on all processes to a single value.
  57.      This routine accepts the following parameters:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____RRRREEEEDDDDUUUUCCCCEEEE((((3333))))                                                    MMMMPPPPIIII____RRRREEEEDDDDUUUUCCCCEEEE((((3333))))
  71.  
  72.  
  73.  
  74.      _s_e_n_d_b_u_f   Specifies the address of the send buffer (choice)
  75.  
  76.      _c_o_u_n_t     Specifies the number of elements in the send buffer (integer)
  77.  
  78.      _d_a_t_a_t_y_p_e  Specifies the data type of elements of the send buffer (handle)
  79.  
  80.      _o_p        Specifies the reduce operation (handle)
  81.  
  82.      _r_o_o_t      Specifies the rank of the root process (integer)
  83.  
  84.      _c_o_m_m      Specifies the communicator (handle)
  85.  
  86.      _r_e_c_v_b_u_f   Returns the address of the receive buffer (choice, significant
  87.                only at root)
  88.  
  89.      _i_e_r_r_o_r    Specifies the return code value for successful completion,
  90.                which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the mmmmppppiiiiffff....hhhh
  91.                file.
  92.  
  93. NNNNOOOOTTTTEEEESSSS
  94.      This implementation currently uses a simple tree algorithm.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.